
var permalink = 'http://tetoblogs.blogspot.com';

var getTwitterCount = function () {
  $.getJSON('http://urls.api.twitter.com/1/urls/count.json?url='+permalink+'&callback=?', function(data){
    var twitterShares = data.count;
    $('.twitter .share-count').text(twitterShares);
  });
};

getTwitterCount();


var getFacebookCount = function () {
  $.getJSON('http://graph.facebook.com/?ids='+permalink+'&callback=?', function(data){
    var facebookShares = data[permalink].shares;
    $('.facebook .share-count').text(facebookShares);
  });
};

getFacebookCount();


var getPinterestCount = function () {
  $.getJSON('http://api.pinterest.com/v1/urls/count.json?url=' + permalink + '&callback=?', function(data) {
    var pinterestShares = data.count;
    $('.pinterest .share-count').text(pinterestShares);
  });
};

getPinterestCount();
